package com.demo.boss.models.request;

import lombok.Data;

import javax.validation.constraints.DecimalMin;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import java.math.BigDecimal;

@Data
public class PayWayConfigRequest {
    @NotNull(message = "产品编码不能空")
    @Size(min = 2, max = 20, message = "产品编码在{min}-{max}个字符")
   private String productCode;
    @NotNull(message = "支付方式编码不能空")
    @Size(min = 2, max = 20, message = "支付方式编码在{min}-{max}个字符")
   private String wayCode;
    @NotNull(message = "支付类型不能空")
    @Size(min = 2, max = 20, message = "支付类型在{min}-{max}个字符")
   private String typeCode;
    @NotNull(message = "手续费不能空")
    @DecimalMin(value = "0.1",message = "手续费不能低于1%")
   private BigDecimal payRate;
    @NotNull(message = "排序不能空")
    @Min(value = 1,message = "排序从1开始")
   private Integer sorts;
}
